home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Demos
/
A.D. Software
/
OOFILE
/
Buildable, limited OOFILE
/
source
/
reports
/
oofhtml.hpp
< prev
next >
Wrap
Text File
|
1996-03-24
|
2KB
|
85 lines
#ifndef H_OOFHTML
#define H_OOFHTML
// COPYRIGHT 1994 A.D. Software, All rights reserved
// report-writer layer of OOFILE database
// NOTE inline definitions included at end of this header file
#include "oof2.hpp"
#include "oofrw.hpp"
#include "oofview.hpp"
class dbRepLineHTML : public dbClass {
public:
dbRepLineHTML() :
mLine(0) {};
~dbRepLineHTML();
private:
dbRepLineHTML(const dbRepLine&) { assert(0); };
void operator=(const dbRepLine&) { assert(0); };
public:
void prepare();
void clear();
void drawNCharsAt(unsigned int hPos, char* theChars, unsigned int len);
void draw(unsigned int indent, ostream& os);
char *mLine; // owned // for drawing onto
unsigned int mWidth; // size of horizontal line - given to us by dbRepPage
unsigned int* mFieldPos; // starting position of each field // owned
};
class dbRepHTML : public dbRep {
public:
// construction
dbRepHTML(const dbRepSizer& sizer, const dbView& fields, const ReportStyles style=columnar) :
dbRep(sizer, fields, style),
mLine() {};
dbRepHTML(const dbRepSizer& sizer, const dbRepColWidths colWidths, const dbView& fields, const ReportStyles style=columnar) :
dbRep(sizer, colWidths, fields, style),
mLine() {};
// use default copy ctor
// presentation
void formatForCharStream(); // may be others later
void draw(ostream&);
bool drawWrappedCharsSingle(unsigned int hPos,unsigned int width,char **theString);
void drawColumnar(ostream&);
void drawPageWise(ostream&);
void drawHeader(ostream&);
private:
dbRepLineHTML mLine;
};
class dbRepHTMLTable : public dbRep {
public:
// construction
dbRepHTMLTable(const dbRepSizer& sizer, const dbView& fields, const ReportStyles style=columnar) :
dbRep(sizer, fields, style),
mCellWidths(0) {};
dbRepHTMLTable(const dbRepSizer& sizer, const dbRepColWidths colWidths, const dbView& fields, const ReportStyles style=columnar) :
dbRep(sizer, colWidths, fields, style),
mCellWidths(0) {};
// use default copy ctor
// presentation
void formatForCharStream(); // may be others later
void draw(ostream&);
void drawColumnar(ostream&);
void drawPageWise(ostream&);
void drawHeader(ostream&);
private:
unsigned int* mCellWidths;
};
#endif